oracle.pg.common

## Class OraclePropertyGraphBase

- java.lang.Object
- - oracle.pg.common.OraclePropertyGraphBase

- All Implemented Interfaces:
    Graph, IndexableGraph, KeyIndexableGraph, TransactionalGraph
  Direct Known Subclasses:
    OraclePropertyGraph

      public abstract class OraclePropertyGraphBase
      extends Object
      implements Graph, TransactionalGraph, IndexableGraph, KeyIndexableGraph

  This class implements the Blueprints Graph interface on top of a supported backend database.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `OraclePropertyGraphBase.OptimizationFlag` This enum defines a set of optimization flags that can be used to influence the construction of Vertex or Edge objects during scans.

    - ### Nested classes/interfaces inherited from interface com.tinkerpop.blueprints.TransactionalGraph

      `TransactionalGraph.Conclusion`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `TYPE_DT_BOOL` This constant denotes a Boolean data type for the value field of an attribute (K/V pair)
    `static int` | `TYPE_DT_DATE` This constant denotes a Date (java.util.Date) data type for the value field of an attribute (K/V pair)
    `static int` | `TYPE_DT_DOUBLE` This constant denotes a Double data type for the value field of an attribute (K/V pair)
    `static int` | `TYPE_DT_EMPTY` This constant denotes an empty data type for the value field of an attribute (K/V pair)
    `static int` | `TYPE_DT_FLOAT` This constant denotes a Float data type for the value field of an attribute (K/V pair)
    `static int` | `TYPE_DT_INTEGER` This constant denotes an Integer data type for the value field of an attribute (K/V pair)
    `static int` | `TYPE_DT_SERI` This constant denotes a Serializable data type for the value field of an attribute (K/V pair)
    `static int` | `TYPE_DT_STRING` This constant denotes a String data type for the value field of an attribute (K/V pair)

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `abstract void` | `clearRepository()` This method removes all vertices and edges from this property graph instance.
    `abstract void` | `dropAllIndices()` Drops all existing indices
    `oracle.pgx.config.AbstractPgGraphConfig` | `getConfig()` Gets the PGX graph config object
    `abstract OracleIndexParameters` | `getDefaultIndexParameters()` Get the default index parameters associated to this property graph.
    `abstract OracleEdgeBase` | `getEdgeInstance(Long eid, boolean bCreateIfAbsentFromCache, boolean bSkipStoreToCache)` Returns an instance of OracleEdgeBase.
    `abstract OracleEdgeBase` | `getEdgeInstance(OracleVertexBase outVertex, OracleVertexBase inVertex, String edgeLabel, Long eid, boolean bCreateIfAbsentFromCache, boolean bSkipStoreToCache)` Returns an instance of OracleEdge
    `abstract Iterable<Edge>` | `getEdges(String key)` Return an iterable to all the edges in the graph that have a particular key.
    `abstract Iterable<Edge>` | `getEdges(String[] keys)` Return an iterable to all the edges in the graph that have any of the specified keys.
    `abstract Iterable<Edge>` | `getEdges(String key, Object value, boolean useWildCards)` Return an iterable to all matching edges that have a particular key/value property.
    `abstract Iterable<Edge>` | `getEdges(String key, Object value, Class dataType, boolean useWildCards)` Return an iterable to all matching edges that have a particular key/value property.
    `String` | `getGraphName()` This method returns the name of this property graph instance
    `abstract OracleIndexManager` | `getOracleIndexManager()`
    `List<Vertex>` | `getShortestPath(oracle.pgx.api.PgxGraph g, Long startVertexID, Long endVertexID, String weightPropertyName, List<Double> weights)` This method finds a shortest path.
    `List<Vertex>` | `getShortestPath(oracle.pgx.api.PgxGraph g, Vertex start, Vertex end, String weightPropertyName, List<Double> weights)` This method finds a shortest path.
    `abstract OracleVertexBase` | `getVertexInstance(Long vid, boolean bCreateIfAbsentFromCache, boolean bSkipStoreToCache)`
    `int` | `getVertexPropertyNames(int dop, int timeout, List<String> propertyNames)` Gets the property names of all vertices.
    `int` | `getVertexPropertyNames(int dop, int timeout, List<String> propertyNames, ProgressListener pl)` Gets the property names of all vertices using ParallelScanners and the specified DOP.
    `abstract Iterable<Vertex>` | `getVertices(String key)` Return an iterable to all the vertices in the graph that have a particular key.
    `abstract Iterable<Vertex>` | `getVertices(String[] keys)` Return an iterable to all the vertices in the graph that have any of the specified keys.
    `abstract Iterable<Vertex>` | `getVertices(String key, Object value, boolean useWildCards)` Return an iterable to all matching vertices that have a particular key/value property.
    `abstract Iterable<Vertex>` | `getVertices(String key, Object value, Class dataType, boolean useWildCards)` Return an iterable to all matching vertices that have a particular key/value property.
    `static String` | `serializableToStr(Serializable seri)` Convert from a Java Serializable object to a String encoding.
    `abstract void` | `setDefaultIndexParameters(OracleIndexParameters indexParams)` Set the default index parameters associated to this property graph.
    `static Object` | `strToSerializable(String s)` Convert from a String encoding to a Serializable object
    `double` | `sum(List<Double> val)` This helper function adds up a list of double values and return the sum.

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface com.tinkerpop.blueprints.TransactionalGraph

      `commit, rollback, shutdown, stopTransaction`

    - ### Methods inherited from interface com.tinkerpop.blueprints.IndexableGraph

      `createIndex, dropIndex, getIndex, getIndices`

    - ### Methods inherited from interface com.tinkerpop.blueprints.KeyIndexableGraph

      `createKeyIndex, dropKeyIndex, getIndexedKeys`

    - ### Methods inherited from interface com.tinkerpop.blueprints.Graph

      `addEdge, addVertex, getEdge, getEdges, getEdges, getFeatures, getVertex, getVertices, getVertices, query, removeEdge, removeVertex`

- - ### Field Detail

    - #### TYPE_DT_BOOL

          public static final int TYPE_DT_BOOL

      This constant denotes a Boolean data type for the value field of an attribute (K/V pair)
      See Also:
        Constant Field Values

    - #### TYPE_DT_DATE

          public static final int TYPE_DT_DATE

      This constant denotes a Date (java.util.Date) data type for the value field of an attribute (K/V pair)
      See Also:
        Constant Field Values

    - #### TYPE_DT_DOUBLE

          public static final int TYPE_DT_DOUBLE

      This constant denotes a Double data type for the value field of an attribute (K/V pair)
      See Also:
        Constant Field Values

    - #### TYPE_DT_EMPTY

          public static final int TYPE_DT_EMPTY

      This constant denotes an empty data type for the value field of an attribute (K/V pair)
      See Also:
        Constant Field Values

    - #### TYPE_DT_FLOAT

          public static final int TYPE_DT_FLOAT

      This constant denotes a Float data type for the value field of an attribute (K/V pair)
      See Also:
        Constant Field Values

    - #### TYPE_DT_INTEGER

          public static final int TYPE_DT_INTEGER

      This constant denotes an Integer data type for the value field of an attribute (K/V pair)
      See Also:
        Constant Field Values

    - #### TYPE_DT_SERI

          public static final int TYPE_DT_SERI

      This constant denotes a Serializable data type for the value field of an attribute (K/V pair)
      See Also:
        Constant Field Values

    - #### TYPE_DT_STRING

          public static final int TYPE_DT_STRING

      This constant denotes a String data type for the value field of an attribute (K/V pair)
      See Also:
        Constant Field Values

  - ### Method Detail

    - #### clearRepository

          public abstract void clearRepository()
                                        throws Exception

      This method removes all vertices and edges from this property graph instance. Additionally, all existing index are removed from this property graph instance. A DDL (truncate) is executed so there is no way to rollback.
      Throws:
        `Exception`

    - #### dropAllIndices

          public abstract void dropAllIndices()

      Drops all existing indices

    - #### getConfig

          public oracle.pgx.config.AbstractPgGraphConfig getConfig()

      Gets the PGX graph config object

    - #### getDefaultIndexParameters

          public abstract OracleIndexParameters getDefaultIndexParameters()

      Get the default index parameters associated to this property graph. The index parameters provided here will be used when an automatic or manual index is to be created without an explicit specification of the index parameters.
      Returns:
        a `OracleIndexParameters` object.

    - #### getEdgeInstance

          public abstract OracleEdgeBase getEdgeInstance(Long eid,
                                       boolean bCreateIfAbsentFromCache,
                                       boolean bSkipStoreToCache)

      Returns an instance of OracleEdgeBase. If there is no match in the cache and bCreateIfAbsentFromCache is false, then a NULL value will be returned.

    - #### getEdgeInstance

          public abstract OracleEdgeBase getEdgeInstance(OracleVertexBase outVertex,
                                       OracleVertexBase inVertex,
                                       String edgeLabel,
                                       Long eid,
                                       boolean bCreateIfAbsentFromCache,
                                       boolean bSkipStoreToCache)

      Returns an instance of OracleEdge

    - #### getEdges

          public abstract Iterable<Edge> getEdges(String key)

      Return an iterable to all the edges in the graph that have a particular key.
      Parameters:
        `key` - name of the property. It can be NULL which implies all edges in the graph will be returned.

    - #### getEdges

          public abstract Iterable<Edge> getEdges(String[] keys)

      Return an iterable to all the edges in the graph that have any of the specified keys.
      Parameters:
        `keys` - an array of property key names. It can be NULL which implies all edges in the graph will be returned.

    - #### getEdges

          public abstract Iterable<Edge> getEdges(String key,
                                Object value,
                                boolean useWildCards)

      Return an iterable to all matching edges that have a particular key/value property. When an automatic text index on the given key is absent, a full table scan will be carried out to find matching edges.
      Parameters:
        `key` - the name of the property. It MUST not be NULL.
        `value` - the value of the property. It can be NULL which will cause all edges with the given key to be returned.
        `useWildCards` - specifies if wild cards can be used in the value object. Wild cards can be used only when an automatic text index on the given key is present.

    - #### getEdges

          public abstract Iterable<Edge> getEdges(String key,
                                Object value,
                                Class dataType,
                                boolean useWildCards)

      Return an iterable to all matching edges that have a particular key/value property. When an automatic text index on the given key is absent, a full table scan will be carried out to find matching edges.
      Parameters:
        `key` - the name of the property. It MUST not be NULL.
        `value` - the value of the property. It can be NULL which will cause all edges with the given key to be returned.
        `dataType` - the datatype of the value object.
        `useWildCards` - specifies if wild cards can be used in the value object. Wild cards can be used only when an automatic text index on the given key is present.

    - #### getGraphName

          public String getGraphName()

      This method returns the name of this property graph instance

    - #### getOracleIndexManager

          public abstract OracleIndexManager getOracleIndexManager()

    - #### getShortestPath

          public List<Vertex> getShortestPath(oracle.pgx.api.PgxGraph g,
                                     Long startVertexID,
                                     Long endVertexID,
                                     String weightPropertyName,
                                     List<Double> weights)
                                       throws InterruptedException,
                                              ExecutionException

      This method finds a shortest path.
      Returns:
        null if there is no path exists between the two given vertices
      Throws:
        `InterruptedException`
        `ExecutionException`

    - #### getShortestPath

          public List<Vertex> getShortestPath(oracle.pgx.api.PgxGraph g,
                                     Vertex start,
                                     Vertex end,
                                     String weightPropertyName,
                                     List<Double> weights)
                                       throws InterruptedException,
                                              ExecutionException

      This method finds a shortest path.
      Returns:
        null if there is no path exists between the two given vertices
      Throws:
        `InterruptedException`
        `ExecutionException`

    - #### getVertexInstance

          public abstract OracleVertexBase getVertexInstance(Long vid,
                                           boolean bCreateIfAbsentFromCache,
                                           boolean bSkipStoreToCache)

    - #### getVertexPropertyNames

          public int getVertexPropertyNames(int dop,
                                   int timeout,
                                   List<String> propertyNames)

      Gets the property names of all vertices.
      Parameters:
        `dop` - degree of parallelism
        `timeout` - maximum time (in seconds) to scan for property names
        `propertyNames` - a output list to hold the property names found

    - #### getVertexPropertyNames

          public int getVertexPropertyNames(int dop,
                                   int timeout,
                                   List<String> propertyNames,
                                   ProgressListener pl)

      Gets the property names of all vertices using ParallelScanners and the specified DOP.
      Parameters:
        `dop` - a positive integer defining the number of threads to use when parallel scanning the vertices.
        `timeout` - maximum time (in seconds) to scan for property names
        `pl` - a ProgressListener object.

    - #### getVertices

          public abstract Iterable<Vertex> getVertices(String key)

      Return an iterable to all the vertices in the graph that have a particular key.
      Parameters:
        `key` - name of the property. It can be NULL which implies all vertices in the graph will be returned.

    - #### getVertices

          public abstract Iterable<Vertex> getVertices(String[] keys)

      Return an iterable to all the vertices in the graph that have any of the specified keys.
      Parameters:
        `keys` - an array of property key names. It can be NULL which implies all vertices in the graph will be returned.

    - #### getVertices

          public abstract Iterable<Vertex> getVertices(String key,
                                     Object value,
                                     boolean useWildCards)

      Return an iterable to all matching vertices that have a particular key/value property. When an automatic text index on the given key is absent, a full table scan will be carried out to find matching vertices.
      Parameters:
        `key` - the name of the property. It MUST not be NULL.
        `value` - the value of the property. It can be NULL which will cause all vertices with the given key to be returned.
        `useWildCards` - specifies if wild cards can be used in the value object. Wild cards can be used only when an automatic text index on the given key is present.

    - #### getVertices

          public abstract Iterable<Vertex> getVertices(String key,
                                     Object value,
                                     Class dataType,
                                     boolean useWildCards)

      Return an iterable to all matching vertices that have a particular key/value property. When an automatic text index on the given key is absent, a full table scan will be carried out to find matching vertices.
      Parameters:
        `key` - the name of the property. It MUST not be NULL.
        `value` - the value of the property. It can be NULL which will cause all vertices with the given key to be returned.
        `dataType` - the datatype of the value object
        `useWildCards` - specifies if wild cards can be used in the value object. Wild cards can be used only when an automatic text index on the given key is present.

    - #### serializableToStr

          public static String serializableToStr(Serializable seri)
                                          throws IOException

      Convert from a Java Serializable object to a String encoding.
      Parameters:
        `seri` - an object of Serializable type. It must not be null.
      Throws:
        `IOException`

    - #### setDefaultIndexParameters

          public abstract void setDefaultIndexParameters(OracleIndexParameters indexParams)

      Set the default index parameters associated to this property graph. The index parameters provided here will be used when an automatic or manual index is to be created without an explicit specification of the index parameters.
      Parameters:
        `indexParams` - a `OracleIndexParameters` object.

    - #### strToSerializable

          public static Object strToSerializable(String s)
                                          throws IOException

      Convert from a String encoding to a Serializable object
      Parameters:
        `s` - String representation of a Java Serializable object. It MUST not be null.
      Throws:
        `IOException`

    - #### sum

          public double sum(List<Double> val)

      This helper function adds up a list of double values and return the sum.

Copyright © 2015 Oracle and/or its afflilates. All Rights Reserved.